﻿using System;

namespace DataCoreTechnologies.SqlServer
{
   public sealed class ExtendedProperty
   {
      public string Name { get; private set; }
      public string Value { get; private set; }
      public Database Database { get; internal set; }
      public Schema Schema { get; internal set; }
      public Table Table { get; internal set; }
      public View View { get; internal set; }
      public Column Column { get; internal set; }
      public StoredProcedure StoredProcedure { get; internal set; }
      public Function Function { get; internal set; }
      public DefaultValue DefaultValue { get; internal set; }
      public CheckConstraint CheckConstraint { get; internal set; }
      public ForeignKey ForeignKey { get; internal set; }
      public PrimaryKey PrimaryKey { get; internal set; }
      public Trigger Trigger { get; internal set; }
      public Index Index { get; internal set; }
      public UserType UserType { get; internal set; }
      /// <summary>
      /// Creates an instance of a extended property with this initial values specified by the parameters.
      /// </summary>
      /// <param name="name">The name of this extended property.</param>
      /// <param name="value">The value in this extended property.</param>
      internal ExtendedProperty(string name, string value)
      {
         Name = name;
         Value = value;
      }
   }
}
